home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_actor_volodnikov.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # actor_Volodnikov.cog
  4. #
  5. # [RT]
  6. #
  7. # Volodnikov's script.
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15.     message        created
  16.     message        damaged
  17.                          
  18.     model        head0=head_vo_asound.3do            local
  19.     model        head1=head_vo_amsound.3do            local
  20.     model        head2=head_vo_osound.3do            local
  21.     model        head3=head_vo_noglasses.3do            local
  22.     model        head4=head_vo_nospecs_asound.3do    local
  23.     model        head5=head_vo_nospecs_amsound.3do    local
  24.     model        head6=head_vo_nospecs_osound.3do    local
  25.  
  26.     sound        snd0=inxv001.wav                    local
  27.     sound        snd1=inxv002.wav                    local
  28.     sound        snd2=inxv003.wav                    local
  29.     sound        snd3=inxv004.wav                    local
  30.  
  31.     thing        volodya                                local
  32.  
  33.     int            newLine                                local
  34.     int            lastLine=-1                            local
  35.  
  36.     int            bTalking=0                            local
  37.  
  38. end
  39.  
  40. # ===================================================================
  41.  
  42. code
  43.  
  44. created:
  45.  
  46.     volodya = GetSenderRef();
  47.  
  48.     SetThingVoiceHeads(volodya, "vohead", "", "head_vo_asound.3do", "head_vo_amsound.3do", "head_vo_osound.3do");
  49.  
  50.     return;
  51.  
  52. # -------------------------------------------------------------------
  53.  
  54. damaged:
  55.  
  56.     if (GetThingParent(GetSourceRef()) != GetLocalPlayerThing()) return;
  57.  
  58.     if (bTalking) return;
  59.  
  60.     bTalking = 1;
  61.  
  62.     volodya = GetSenderRef();
  63.  
  64.     # Impact damage
  65.     if (BitTest(GetParam(1), 0x1))
  66.     {
  67.         while (newLine == lastLine)
  68.         {
  69.             newLine = RandBetween(0, 3);
  70.         }
  71.     }
  72.     # Anything else
  73.     else
  74.     {
  75.         while (newLine == lastLine)
  76.         {
  77.             newLine = RandBetween(2, 3);
  78.         }
  79.     }
  80.  
  81.     # Start the voice & wait...
  82.     PlayVoice(volodya, snd0[newLine], 1.0, 1);
  83.  
  84.     bTalking = 0;
  85.     lastLine = newLine;
  86.  
  87.     return;
  88.  
  89. end